In memory devices, databases are often used in applications to collect and organize a set of related data objects. For example, an intrusion detection and prevention system may use a database to store attack signatures; a firewall may use a database to store policies; an address book may use a database to store addresses, etc. Databases vary in size, and may include upwards of thousands of database objects.
Database management may include performing operations on a database object, such as insertion, deletion, updating, and searching. Such operations may be accomplished in O(n) time in database systems in which database objects are arranged in a linked-list type of data structure (where O is the Landau or big-O notation, and n is the number of objects in the database). Some database operations, on the other hand, may require in-order iteration or traversal over most or all of the database objects. The amount of time associated with iterating n database objects may approximate O(C*n), where C may be a (large) constant. In a database where n is large, O(C*n) may be deemed too long of a time to lock (i.e., grant exclusive access to) the database such that other operations cannot be performed on the database during the iteration. Accordingly, a database management system may allow shared access to a database such that multiple users may concurrently perform non-preemptive operations on the database.
Generating a list of database objects typically involves buffering references, e.g., pointers, corresponding to the respective database objects, since too much memory would be used to buffer the objects themselves. To display the database object associated with a particular buffered pointer, the content of the associated object may be accessed by dereferencing the buffered pointer. In a database management system that allows non-exclusive access to a database, objects may be deleted from the database by one user, for example, while another user displays a list of the objects corresponding to the buffered pointers. An attempt to access the contents of a database object which has been deleted in the interim by the other user (i.e., dereferencing an invalid pointer), may cause an operating system failure (e.g., system crash) or otherwise create system performance issues.